import React, {Component, PropTypes} from 'react';
import Echarts from 'echarts';
import {connect} from 'dva'
import {
  Input,
  Button,
  Select,
  Form,
  Modal,
  Row,
  Col,
  Icon,
  Table,
  Card
} from 'antd';
import Styles from './home.less';
import NumberPlay from '../../util/numberPlay';

const FormItem = Form.Item;
const createForm = Form.create;
const Option = Select.Option;

const formItemLayout = {
  labelCol: {
    span: 5
  },
  wrapperCol: {
    span: 19
  }
};
class App extends Component {
  constructor(props) {
    super(props);
    this.state = {
      data: []
    };
    this.Element = 'chartElement';
  }
  componentDidMount() {
    const userData = JSON.parse(localStorage.getItem('userDetail'));
    // this.props.queryStatistics({userId: userData.id,instCode: userData.companyId});
  }

  render() {
    return (
      <div className={Styles.homeStyle}>
        个人资料
      </div>
    )
  }
}

App.contextTypes = {
  router: React.PropTypes.object
}

function mapStateToProps(state, ownProps) {
  // console.log(state)
  return {
    Statistics: state.myHome.Statistics,
    loading: !!state.loading.global
  }
}

function dispatchToProps(dispatch) {
  return {
    queryStatistics(payload, params) {
      dispatch({type: 'myHome/queryStatistics', payload})
    }
  }
}
export default connect(mapStateToProps, dispatchToProps)(Form.create()(App));
